import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入字体的文件
import './assets/font/iconfont.css'
import axios from 'axios'
// import fs from "fs";
import stream from 'stream'
import * as echarts from 'echarts';
// 引入全局样式
import './assets/less/global.less'
import '../public/static/theme/chalk'
import 'element-ui/lib/theme-chalk/index.css';
// import * as XLSX from 'xlsx';
import ElementUI from 'element-ui';
import SocketService from "@/utils/socket_service";

// 获取实例对象，调用他的方法，完成服务端对websocket的连接
SocketService.Instace.connect()
// 请求基准路径

axios.defaults.baseURL = 'http://127.0.0.1:8888/api'


Vue.use(ElementUI);
// Vue.use(XLSX)

Vue.config.productionTip = false

Vue.prototype.$echarts = window.echarts //也可以从index引入echart
Vue.prototype.$echarts = echarts
Vue.prototype.$http = axios
Vue.prototype.$stream = stream
Vue.prototype.$socket = SocketService.Instace

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
